add error checking and more tests for diff image