Fix for Operator precedence

Precedence 'not' operator is lower than '&&' operator.
Fix invalid log collecting
Merge pull request #1 from syohex/fix-log

Fix invalid log collecting