close opened files