file output is solved
TODO: reset fileinput
TODO: check input