logging: fix issue storing exceptions