module: fix init_module_from_file() error handling