removing graph in finally block