add preserveComments option to handle comments in output