Fix a recursive path in file creation
Handle game input and output in a different file