Add EOF handling to comment