replace magic number 34 by errno-codes