need to create log directory before trying to write to it