Refactored bucket creation to wait for server to be ready