Revert (wrong branch) "Issue #48: first working version (sometimes the logs don't appear)"

This reverts commit 6c5d139c02f1b70cff2c62693dfa0e1a37a20e9c.