Loopback working, still throws error on exit