added debug to api start