Added PInstr handler; fixed bug when reading file