fixed Mast.log function