added std namespace qualifier to all exit calls