Fix for issue #44
fixed test cases. Also fix for issue #39
Added logging running commands
Changed some log events to warning