Logging function added to lib.l (thx to Alex!)