Adding logging and user id conversion to int