Added error trapping to pipeline input