Use resource loader instead of FILE*.