Logging data from two sensors using adalogger

I am trying to save data from Max30100 and AM2320 into two separate csv files on a micro SD card using Adalogger. I modified the code for 'Battery and analog input logger' by Tom Igoe as shown in the attached code to acquire and save the data from these two sensors. I am using heart rate click board for Max30100 and AM2320. Both SCL and SDA terminals are connected with 4.7 kohm pullup resistors.

I am able to log the data from Max30100 into SD card using the attached code but when I try to uncomment the following lines, I am not able to get the data from Max30100. The data is saved in both files but the output is 0.00, 0% from Max30100. I am not able to figure out what is the mistake in the following lines that is causing this problem. Please suggest appropriate changes to fix this issue. Thanks.

In void setup():
// File logFile2 = SD.open(fileName2, FILE_WRITE);
// // write header columns to file:
// if (logFile2) {
// logFile2.println(" Temperature (degC), Humidity %");
// logFile2.close();
// }

In void loop():
// writeth();

SensorLogger3.ino (4.75 KB)