made logger write through and fixed json object compile issues.