Fixed file input and print input to console