Catch background submission failure

Close #1033.