Replace usage of System to System.Process and System.Exit