Completed uplogger script