added exception to logging