tons of minor tweak
Stop backend process on exit
catch all exception in mainloop