Added #include <cstdio> to log.h