Better error messages in batch job