Added more exceptions.
Enabled logging in tests.