Check value change in the main loop