stdio.h added in detect_impl.cc