Added blocking loop which tracks events