Added error handling to load <plugin> command

fixing #1506
Trailing whitespace