Merge pull request #518 from y-higuchi/fix_logs

Fix various logging related issues.