Added thread and constant checking of condition