Modify EOF only if it is not ending with \n

50% more performance (no one cares for).