Fix a null pointer
Add logging to a target, for creating logfiles for seperate channels
later