Better error handling when sending a task to a cluster (e.g. running qsub)