Corrected data types and updated logging statements for clarity.