mask management and error message update