I use newrelic to keep track of anything on my website and I always get this error:
Error message: E_WARNING: fclose() expects parameter 1 to be resou
Try
$fh = fopen('/var/log/bfd_log', 'a+');
a+ mode will create the file if it does not exists