What a weird problem! Yes, "hash -l" should produce output that can be read by bash. But sending the "bash: hash table empty" message to stderr put you in the situation where "hash -l >file" doesn't really leave the output of "hash -l" in "file". Maybe you could make the empty message be a comment?
$ hash -l # hash: hash table empty That is acceptable input for bash, has the right effect when read by bash, is human-readable, and is capturable by redirecting stdout. Dale