added fix for file plugin to work nicely with S3