Added status line and trailing space detection