Add new lock handling utility