Fixed problem with EOF endings for cat statements