fix wrong input which makes the program crash
print more readable output to files