Patched Added logging support
Fix this again later.