return string and error if occured