The start and end messages should ideally be outside the if.