removed 'try to write to file' in Main