Add option to trim trailing space