Fixed debug version generation
Added internal log() function started using it