#141 redo table open and close locking to avoid table opening pileup