cleaning up the paths for s3 files
new version