Improve error handling in userRecord.go