fixed error where we needed to build the path to the image AFTER we save the image