fixing method to write to file