should be check_and_set (not dir)