Fix incorrect warning on resource loading error

Issue #6.