die "Didn't get a sensible result from cacheout() for '$file'. Maybe this helps: $!" unless $fh;