create dir path and write to log file: open for append fails when we've just created the dir, but works on subsequent calls