fixed bug where test program would crash when "test.txt" file didn't exist