add error checking to makeplugin