Added metadata support to s3 module