Fixes #248 Exceptions thrown in tasks.scan() do not result in a failed scan