       end
 
     end
-  # end # gnexec
+   end # gnexec
 end

    json(conn, %{"I am": :genenetwork, "version": version })
  end

  # namespace :gnexec do
    namespace :program do
      route_param :token, type: String do
        get "status.json" do

              Poison.Parser.parse!(File.read!(status_path_file),keys: :atoms!)
          end
          json(conn, status)
        end #get status.json

        desc "Update a status"
        params do
          requires :progress, type: Integer
        end
        put "status.json" do
          static_path = Application.get_env(:gn_server, :static_path_prefix)
          status_path = Path.join(static_path, params[:token])
          response = case File.exists?(status_path) do
            false -> %{error: :invalid_token}
            true ->
              status_path_file = Path.join(status_path, "status.json")
              File.write(status_path_file, Poison.encode!(%{progress: params[:progress]}), [:binary])
              %{token: params[:token], progress: params[:progress] }
          end

          json(conn, response)
        end

        get "results.json" do
