inproved error checks in call_mclapply