there were still many error messages with a newline at the end
removed reading a file with the buffer struct and instead used file operations