handling non existent file for replace_image