CHANGED:using the try catch block for the image upload service