Fix multithread problem
Fix linux compatibility
added output of convergence data
Fix converge checking
Add extra return to template