Add timer test + sub routine to capture message according to state from main