Fixed bug in writing to parser file where it fails if file does not exist yet.