added error checking for image and status input file