debug plot saving