[fixes #145] The debug image gets returned now, even if the scanning failed.

fixes #145