Fixed program trying to load non-image files