moved the show graph to a finally block