add logwriter and config