Added message logging