add some debugging and ensure required fields are set
small debugging changes