improved error handling and API function LookupNames
updated documentation