Fixing newline bug in process output