introduce a coherent function to read the beginning of a compressed file
refactor append to use the _read_beginning
remove left over debugging statement found in test-suite