added process.exit to atExit function

Without this the process hangs on my linux machine...