Improve comments and feedback to users
Add example function for writing to a file