close the file in deconstructor