Include function name in database calls, debugging "unknown error"