check for messages before waiting