Added a line of code to delete the old image while updating with new image