Fix for file plugin to work with S3