fixing missing savedir argument