Fixes and added custom logger macro.