Changed to read in entire file to buffer then output char by char