bugfix if savedir doesnot exist