Missing declaration
More robust mock image and tweaked error reporting