Was this 'lastDataDir' line copied in by mistake? That's not relevant to this code, is it?