protected function bin($program = '')
    {
        // Get list of allowed search paths
        if ($location = $this->config()->get('binary_location')) {
            $locations = [$location];
        } else {
            $locations = $this->config()->get('search_binary_locations');
        }

        // Find program in each path
        foreach ($locations as $location) {
            $path = "{$location}/{$program}";
            if (file_exists($path)) {
                return $path;
            }
            if (file_exists($path . '.exe')) {
                return $path . '.exe';
            }
        }

        // Not found
        return null;
    }