hmmm, hit a problem in another function where you used `pofile` for multiple meanings.  Perhaps using `fp` (for file pointer) here would avoid that variable naming collision issue in the future.