add basic pcie error handling code, but commented out now