remove trailing empty line