moved S3.php to lib director