I have published a geoprocessing tool in arcgis portal using arcpy, this tool takes some input parameters from the user and performs a multi criteria analysis on the basis of input parameters. and saves the output in a datastore folder, then I publish that raster on the server by creating its sddraft and sd files using arcpy. The problem is, when I publish raster using UploadServiceDefinition_server function it produces error that image does exist on the published folder. why is it searching in published folder, as it exist in the datastore folder. Error message is shown in the attached picture.