cleaned up files.
removed overhead due to double call of open()