Changed printf calls to use ac_log()