Added option for cleaning up failed jobs, see issue #4