segfault when logging that couldn't open log file fixed, now log to stderr