add code for QTPFS and HAPFS