improve PDB read/write