catch lock errors