Check whether /dev/log exists before trying to use it

Fixes #344