Only try to create directory if a logfile has been given