Try to fix #40 - check class exists before trying to load it.