make jobexecutor correctly handle pipe reads
reformat code