Added error logging
Added error handling of results