Create the file in a temporary directory and name it something unusual...I prefer naming them md5sum + .tmp
Then, create a script that checks all the files in a dir and deletes those that are older than 3 hours. Cron this script to run every 3 hours and you're set.