Added function to check if another operation is in progress