Fixed issues with masking the decimal part of a number. Added logging too.