added additional error handling, hopefully issues with missing drivers for unneeded apis should be resolved