Bugfix : close associated file causing error