removing extra newlines from pcat output