error checking when creating system image file