updates write_to_file to append_to_file
    * the 'w' flag for File.open was overwriting the contents of
    the file passed in