Set up logging. Make dates more tolerant