removed spaces, added new lines to fwrite statements