Remove trailing empty lines