cleanup
dont rely on 'id' usage- use dirname+filename (or saveAs())