refactorings on S3 paths