Wrote configuration logic