Replace 'printf' function.