removed process.exit() statements, since they might be causing problems