Robot main script with logging function enabled