Allow user input and move file writer to class