close file handles