Tweaked Flash to extract basename