Write modules out