Fixed crash if log directory already exist