Minor fixes to PFL.cc to add extra error checking and eliminate compiler warnings.