use get_module_file_attribute instead of mod.__file__
add comment explaining need for hook