Added error handling to load <plugin> command

fixing #1506