Use mktemp instead of date for safety