Fixed reading files without newline at the end