lazy server: better exiting, using spawn(fun) to prevent export internal method