prevent overwriting segments while loading
force save buffer on shutdown