add message function and quiet mode