Added ifdefs for datalogger