Change S3 check function