Adding method subDir and class S3Route.