Added error handling for missing temps variable in the query string
Fixed some minor formatting issues with formatSizeUnits and added terabyte conversion