updated s3 to 0.5. made addtions

specifically on line 549 to force pdf detection