[hexadaemon] added asynchronous exception handling and fixed a memory leak