added some exception logging