Print error with the right function.