use with statement for inc_lock