Fix log error

see #169
More logical return

see #169
Fix log error

see #161