stdio callback function added