Replacing S3 URIs with file URIs.
Adding check to ensure file uris validate.