replace error by print