Add engine quit handler for File->Close