added error handling to prf, bail on bad params
added TODO to log.h