implemented error numbers and perror