Only preserve intermediate work in debug mode