allowing for service.api_name to be changed for local file storage, refactoring