Revert "console.log into logger, few more fixes."

This reverts commit 88d7a09fc5d0751dc2178fbd153c48f310fa846e.
mkdir once instead of twice
fixed stuffffffff