Uncommented system.exit so the files can write