use only message function for returning errors