small modification to properly generate done file
small modification to correct dumb bug