added single message output
fixed messages sorting