Updated SLURMTask with correct job status updates and more error handling.