closing the file is necessary