                 throw std::runtime_error( "timestepper: output-mode "+output_mode+" not recognized!\n");
 
         }
+        bool abort = false;
         for( unsigned i=1; i<=maxout; i++)
         {
             dg::Timer ti;

            DG_RANK0 err = nc_close(ncid);
            ti.toc();
            DG_RANK0 std::cout << "\n\t Time for output: "<<ti.diff()<<"s\n\n"<<std::flush;
        }
        t.toc();
        unsigned hour = (unsigned)floor(t.diff()/3600);


                tti.toc();
                DG_RANK0 std::cout << " Time for internal diagnostics "<<tti.diff()<<"s\n";
                if( abort) break;
            }
            ti.toc();
            //----------------Test if ampere equation holds
            if( p.beta != 0 && !abort)
            {
                feltor.compute_lapMperpA( resultD);
                double norm  = dg::blas2::dot( resultD, feltor.vol3d(), resultD);
