   @env Farmbot.Project.env()
   use Farmbot.Logger
 
-  @handler Application.get_env(:farmbot, :behaviour)[:update_handler] || Mix.raise("Please configure `config :farmbot, :behaviour, [update_handler: <handler_mod>]`")
+  @handler Application.get_env(:farmbot, :behaviour)[:update_handler]
+  @handler || Mix.raise("Please configure update_handler")
 
   alias Farmbot.System.ConfigStorage
 


  defp do_download_and_apply(dl_url, new_version) do
    dl_fun = Farmbot.BotState.download_progress_fun("FBOS_OTA")
    case Farmbot.HTTP.download_file(dl_url, Path.join(@data_path, "#{new_version}.fw"), dl_fun, "", []) do
      {:ok, path} ->
        apply_firmware(path)
      {:error, reason} ->

        do_download_and_apply(fw_url, new_version)
      end
    else
      :error ->
        msg = "Unexpected release HTTP response or wrong formated `tag_name`"
        Logger.error 2, msg

      {:error, :no_fw_url} ->
        Logger.error 2, "No firmware in update asssets."

      {:error, reason} ->
        Logger.error 1, "Failed to fetch update data: #{inspect reason}"

      {:ok, %{body: body, status_code: code}} ->
        reason = case Poison.decode(body) do
          {:ok, res} -> res
