Added in a bit more logging and also using API 18