add nicer error handling when write perms not on LOG_FILENAME