[#12] changed write_to_file to be a class method