save basename along with filename and only replace .rrd for it if it's at the end...