move s3_file hwrp into a library file