Added problem recognition

Will now recognize most problems and print the lines they occured on.
Also fixed entering input and output files.