also rename file when it has not been present before

we also need to rename the file when first creating it for a put request @dragotin