debug print only if error happend