Fixed print error function.