fixed error checking for 'install' command