write function

Save the constructed emulator