Strip trailing whitespace from lines in quote submission, added logging