Added error checking for external lib location