1. combine the code from qsession
2. add message.json for standard log output