[wmlunits] Fix error logging. 

I guess on github a pull request makes more sense than asking for commit access again...