use filename to control save