added some logging and exc