bugfix: added file close to all open handlers