Use Do it and Show us the Do it results
It looks like your replace method does not make sense like that... we will know more after seeing the Do it results
You are using the CopyAsync method of the file extension... you should should use this together with the Copied event as mentioned in the documentation App Inventor Extensions: File | Pura Vida Apps
Event indicating that copying a file has finished, which was started using the CopyAsync method.
In case everything went fine, parameter successful is true. In case an error occurred, parameter successful is false and parameter response will provide an error message.
You forgot to use the GalleryRefresh method... try to use it in the Copied event