close opened file.