can now write to file as well as add comments periodically.