I can create a file and save it (i.e as file.txt) and it shows the text on separated lines(including exit) but the program doesn't pass the validation. Additionally, I also got the message from: The program must write absolutely all of the entered lines (including "exit") to the file, each on a new line: CodeGym security exception. You are performing a forbidden or potentially dangerous operation. I am not sure what kind of operation it is (but it sounds like a proper badass :D and it made my day xD)