Fixed an issue where destructor would try to close the filewhen it did not exists. Renamed f_name to file_name.