Improved unique filename generation (uses a random hex now)