java 7 try-with-resouces does not close immediately