Check lock for error