Messages are displayed after reading of user input. Change to display them before.