protected function validateTask($taskObject)
    {
        try {
            if (!$taskObject->validate($msg)) {
                $this->log->warn("Task {$taskObject->getName()} is invalid.".
                    ($msg ? "\nError message: $msg" : '')
                );

                return false;
            }

            return true;
        } catch (MalformedConfigException $e) {
            $this->log->error("Error in task {$taskObject->getName()} configuration: ".
                $e->getMessage()
            );

            return false;
        }
    }