diff --git a/cli_test.go b/cli_test.go
index b496ce2..615c647 100644
--- a/cli_test.go
+++ b/cli_test.go
@@ -3,6 +3,7 @@
 package main
 
 import (
+	"os"
 	"testing"
 
 	"git.froth.zone/sam/awl/util"
@@ -41,3 +42,38 @@ func TestArgParse(t *testing.T) {
 		assert.Equal(t, test.want, act)
 	}
 }
+
+func TestQuery(t *testing.T) {
+	app := prepareCLI()
+	args := os.Args[0:1]
+	args = append(args, "--Treebug")
+	err := app.Run(args)
+	assert.NotNil(t, err)
+}
+func TestHTTPS(t *testing.T) {
+	app := prepareCLI()
+	args := os.Args[0:1]
+	args = append(args, "-H")
+	args = append(args, "@https://cloudflare-dns.com/dns-query")
+	args = append(args, "git.froth.zone")
+	err := app.Run(args)
+	assert.Nil(t, err)
+}
+
+func FuzzCli(f *testing.F) {
+	testcases := []string{"git.froth.zone", "", "!12345", "google.com.edu.org.fr"}
+	for _, tc := range testcases {
+		f.Add(tc)
+	}
+
+	f.Fuzz(func(t *testing.T, orig string) {
+		app := prepareCLI()
+		args := os.Args[0:1]
+		args = append(args, orig)
+		err := app.Run(args)
+		if err != nil {
+			assert.ErrorContains(t, err, "domain must be fully qualified")
+		}
+		assert.Nil(t, err)
+	})
+}
diff --git a/logawl/logawl.go b/logawl/logawl.go
index 02bdce8..f5c996e 100644
--- a/logawl/logawl.go
+++ b/logawl/logawl.go
@@ -46,7 +46,7 @@ func (l *Logger) UnMarshalLevel(lv Level) (string, error) {
 	case 3:
 		return "DEBUG ", nil
 	}
-	return "", fmt.Errorf("Invalid log level choice")
+	return "", fmt.Errorf("invalid log level choice")
 }
 
 func (l *Logger) IsLevel(level Level) bool {
diff --git a/logawl/logger.go b/logawl/logger.go
index 44ec205..607f516 100644
--- a/logawl/logger.go
+++ b/logawl/logger.go
@@ -44,7 +44,7 @@ func (l *Logger) Println(level Level, v ...any) {
 }
 
 // Formats the log header as such <LogLevel> YYYY/MM/DD HH:MM:SS (local time) <the message to log>
-func (l *Logger) formatHeader(buf *[]byte, t time.Time, line int, level Level) {
+func (l *Logger) formatHeader(buf *[]byte, t time.Time, line int, level Level) error {
 	if lvl, err := l.UnMarshalLevel(level); err == nil {
 		// This is ugly but functional
 		// maybe there can be an append func or something in the future
@@ -67,10 +67,9 @@ func (l *Logger) formatHeader(buf *[]byte, t time.Time, line int, level Level) {
 		*buf = append(*buf, ':')
 		*buf = append(*buf, ' ')
 	} else {
-		fmt.Printf("Unable to unmarshal log level: %v", err)
-		os.Exit(2) //Fucking kill him
+		return fmt.Errorf("invalid log level choice")
 	}
-
+	return nil
 }
 
 // Printer prints the formatted message directly to stdErr
diff --git a/logawl/logging_test.go b/logawl/logging_test.go
new file mode 100644
index 0000000..606cd5c
--- /dev/null
+++ b/logawl/logging_test.go
@@ -0,0 +1,83 @@
+package logawl
+
+import (
+	"bytes"
+	"testing"
+	"time"
+
+	"github.com/stretchr/testify/assert"
+)
+
+var logger = New()
+
+func TestLogawl(t *testing.T) {
+
+	assert.Equal(t, Level(2), logger.Level) //cast 2 (int) to 2 (level)
+
+	//Validate setting and getting levels from memory works
+	for i := range AllLevels {
+		logger.SetLevel(Level(i))
+		assert.Equal(t, Level(i), logger.GetLevel())
+	}
+
+}
+
+func TestUnmarshalLevels(t *testing.T) {
+	m := make(map[int]string)
+	var err error
+	//Fill map with unmarshalled level info
+	for i := range AllLevels {
+		m[i], err = logger.UnMarshalLevel(Level(i))
+		assert.Nil(t, err)
+	}
+
+	//iterate over map and assert equal
+	for i := range AllLevels {
+		lv, err := logger.UnMarshalLevel(Level(i))
+		assert.Nil(t, err)
+		assert.Equal(t, m[i], lv)
+	}
+
+	lv, err := logger.UnMarshalLevel(Level(9001))
+	assert.NotNil(t, err)
+	assert.Equal(t, "", lv)
+	assert.ErrorContains(t, err, "invalid log level choice")
+}
+
+func TestLogger(t *testing.T) {
+
+	for i := range AllLevels {
+		// only test non-exiting log levels
+		switch i {
+		case 1:
+			fn := func() {
+				logger.Info("")
+			}
+			var buffer bytes.Buffer
+			logger.Out = &buffer
+			fn()
+		case 2:
+			fn := func() {
+				logger.Info("Test")
+			}
+			var buffer bytes.Buffer
+			logger.Out = &buffer
+			fn()
+		case 3:
+			fn := func() {
+				logger.Debug("Test")
+			}
+			var buffer bytes.Buffer
+			logger.Out = &buffer
+			fn()
+		}
+	}
+
+}
+
+func TestFmt(t *testing.T) {
+	ti := time.Now()
+	test := []byte("test")
+	assert.NotNil(t, logger.formatHeader(&test, ti, 0, Level(9001))) //make sure error is error
+
+}
diff --git a/query/query_test.go b/query/query_test.go
new file mode 100644
index 0000000..35dec48
--- /dev/null
+++ b/query/query_test.go
@@ -0,0 +1,112 @@
+package query
+
+import (
+	"fmt"
+	"net"
+	"strconv"
+	"strings"
+	"testing"
+
+	"git.froth.zone/sam/awl/util"
+	"github.com/miekg/dns"
+	"github.com/stretchr/testify/assert"
+)
+
+func TestResolveHTTPS(t *testing.T) {
+	var err error
+	testCase := util.Answers{Server: "dns9.quad9.net/dns-query", Request: dns.TypeA, Name: "git.froth.zone"}
+	if !strings.HasPrefix(testCase.Server, "https://") {
+		testCase.Server = "https://" + testCase.Server
+	}
+	// if the domain is not canonical, make it canonical
+	if !strings.HasSuffix(testCase.Name, ".") {
+		testCase.Name = fmt.Sprintf("%s.", testCase.Name)
+	}
+
+	msg := new(dns.Msg)
+	msg.SetQuestion(testCase.Name, testCase.Request)
+	msg = msg.SetQuestion(testCase.Name, testCase.Request)
+	var in *dns.Msg
+	in, testCase.RTT, err = ResolveHTTPS(msg, testCase.Server)
+	assert.Nil(t, err)
+	assert.NotNil(t, in)
+
+}
+
+func Test2ResolveHTTPS(t *testing.T) {
+	var err error
+	testCase := util.Answers{Server: "dns9.quad9.net/dns-query", Request: dns.TypeA, Name: "git.froth.zone"}
+
+	msg := new(dns.Msg)
+	msg.SetQuestion(testCase.Name, testCase.Request)
+	msg = msg.SetQuestion(testCase.Name, testCase.Request)
+	var in *dns.Msg
+	in, testCase.RTT, err = ResolveHTTPS(msg, testCase.Server)
+	assert.NotNil(t, err)
+	assert.Nil(t, in)
+
+}
+func Test3ResolveHTTPS(t *testing.T) {
+	var err error
+	testCase := util.Answers{Server: "dns9..quad9.net/dns-query", Request: dns.TypeA, Name: "git.froth.zone."}
+	if !strings.HasPrefix(testCase.Server, "https://") {
+		testCase.Server = "https://" + testCase.Server
+	}
+	// if the domain is not canonical, make it canonical
+	if !strings.HasSuffix(testCase.Name, ".") {
+		testCase.Name = fmt.Sprintf("%s.", testCase.Name)
+	}
+	msg := new(dns.Msg)
+	msg.SetQuestion(testCase.Name, testCase.Request)
+	msg = msg.SetQuestion(testCase.Name, testCase.Request)
+	var in *dns.Msg
+	in, testCase.RTT, err = ResolveHTTPS(msg, testCase.Server)
+	assert.NotNil(t, err)
+	assert.Nil(t, in)
+
+}
+
+func TestQuic(t *testing.T) {
+	var err error
+	testCase := util.Answers{Server: "dns.adguard.com", Request: dns.TypeA, Name: "git.froth.zone"}
+	testCase2 := util.Answers{Server: "dns.adguard.com", Request: dns.TypeA, Name: "git.froth.zone"}
+	var testCases []util.Answers
+	testCases = append(testCases, testCase)
+	testCases = append(testCases, testCase2)
+
+	for i := range testCases {
+		switch i {
+		case 0:
+			port := 853
+			testCases[i].Server = net.JoinHostPort(testCases[i].Server, strconv.Itoa(port))
+			fmt.Println(testCases[i].Server)
+			// if the domain is not canonical, make it canonical
+			if !strings.HasSuffix(testCase.Name, ".") {
+				testCases[i].Name = fmt.Sprintf("%s.", testCases[i].Name)
+			}
+			msg := new(dns.Msg)
+			msg.SetQuestion(testCase.Name, testCase.Request)
+			msg = msg.SetQuestion(testCase.Name, testCase.Request)
+			var in *dns.Msg
+			in, testCase.RTT, err = ResolveQUIC(msg, testCase.Server)
+			assert.NotNil(t, err)
+			assert.Nil(t, in)
+		case 1:
+			port := 853
+			testCases[i].Server = net.JoinHostPort(testCases[i].Server, strconv.Itoa(port))
+			// if the domain is not canonical, make it canonical
+			if !strings.HasSuffix(testCase.Name, ".") {
+				testCases[i].Name = fmt.Sprintf("%s.", testCases[i].Name)
+			}
+			msg := new(dns.Msg)
+			msg.SetQuestion(testCases[i].Name, testCases[i].Request)
+			msg = msg.SetQuestion(testCases[i].Name, testCases[i].Request)
+			var in *dns.Msg
+			in, testCase.RTT, err = ResolveQUIC(msg, testCases[i].Server)
+			assert.Nil(t, err)
+			assert.NotNil(t, in)
+		}
+
+	}
+
+}
