Logic for parallelization is done, weird hang up occurring after program finishes - waits for another command from stdin