Moved user ID fetch; exception prints stack trace