Fixes case where logfile is nil and chef-client crashes.