Ensure log directory is defined properly