cleaning up exception handling, logging everything