Fixed the cmd log issue

Now errors and log statements should be properly reported.