add trim flag to remove pb leading line break