Also ensure the temporary file a) is always different, by using mktemp and b) is always deleted with an EXIT trap