todo: image.cc loops around checkArguments