Made printer read from an input file rather than stdin.