fixed bug with exception passing to logger