diff --git a/Makefile b/Makefile
index 8df86dd..575cac2 100644
--- a/Makefile
+++ b/Makefile
@@ -82,7 +82,7 @@
 	chmod 755 $(GOPATH)/bin/hadolint
 endif
 	@echo "Running Dockerfile lint check ..."
-	@hadolint $$(find . -name "Dockerfile")
+	@hadolint $$(find .  -type f -not -path "./vendor/*"  -name "Dockerfile")
 	@echo "Dockerfile lint check OK"
 
 lint-style:
diff --git a/data_collector.go b/data_collector.go
index c626427..f1bc1b1 100644
--- a/data_collector.go
+++ b/data_collector.go
@@ -15,14 +15,14 @@
 package main
 
 import (
-	"net/http"
-	"fmt"
 	"encoding/json"
+	"fmt"
 	"io/ioutil"
+	"net/http"
 )
 
 /* parse_map() parses the json structure, amap, and returns all sub-folder paths found at the 2nd level of the multiplayer structure
-*/
+ */
 func parse_map(amap map[string]interface{}, level uint, archive map[string]bool) (paths []string) {
 	level = level + 1
 	for key, val := range amap {
@@ -35,7 +35,7 @@
 			paths = append(paths, p...)
 		default:
 			if level == 2 && key == "@odata.id" {
-			/* sub-folder path of a resource can be found as the value of the key '@odata.id' showing up at the 2nd level of the data read from a resource. When a path is found, it's checked against the array 'archive' to avoid duplicates. */
+				/* sub-folder path of a resource can be found as the value of the key '@odata.id' showing up at the 2nd level of the data read from a resource. When a path is found, it's checked against the array 'archive' to avoid duplicates. */
 				if _, ok := archive[val.(string)]; !ok {
 					archive[val.(string)] = true
 					paths = append(paths, val.(string))
@@ -47,7 +47,7 @@
 }
 
 /* parse_array() parses any vlaue, if in the form of an array, of a key-value pair found in the json structure, and returns any paths found.
-*/
+ */
 func parse_array(anarray []interface{}, level uint, archive map[string]bool) (paths []string) {
 	for _, val := range anarray {
 		switch val.(type) {
diff --git a/demo_test/cmd_client/cmd_cl.go b/demo_test/cmd_client/cmd_cl.go
index 2f8d865..067f8f4 100644
--- a/demo_test/cmd_client/cmd_cl.go
+++ b/demo_test/cmd_client/cmd_cl.go
@@ -29,13 +29,13 @@
 		fmt.Print("CMD to send : ")
 		text, _ := reader.ReadString('\n')
 		// send to socket
-		fmt.Fprintf(conn, text + "\n")
+		fmt.Fprintf(conn, text+"\n")
 
 		// listen for reply
 		message, _ = bufio.NewReader(conn).ReadString('\n')
 		fmt.Print("Return from server: " + message)
 
-		if message == "QUIT\n"{
+		if message == "QUIT\n" {
 			break
 		}
 	}
diff --git a/demo_test/test.go b/demo_test/test.go
index 168dad1..9fcd888 100644
--- a/demo_test/test.go
+++ b/demo_test/test.go
@@ -15,12 +15,12 @@
 package main
 
 import (
-	"github.com/opencord/device-management/demo_test/proto"
 	"bufio"
 	"bytes"
 	"crypto/tls"
 	"fmt"
 	"github.com/Shopify/sarama"
+	"github.com/opencord/device-management/demo_test/proto"
 	log "github.com/sirupsen/logrus"
 	"golang.org/x/net/context"
 	"google.golang.org/grpc"
@@ -51,7 +51,7 @@
 var conn *grpc.ClientConn
 
 func GetCurrentDevices() (error, []string) {
-	fmt.Println("Testing GetCurrentDevices\n")
+	fmt.Println("Testing GetCurrentDevices")
 	empty := new(importer.Empty)
 	var ret_msg *importer.DeviceListByIp
 	ret_msg, err := cc.GetCurrentDevices(ctx, empty)
@@ -73,7 +73,7 @@
 	log.Info("Starting topicListener for ", *topic)
 	consumer, err := master.ConsumePartition(*topic, 0, sarama.OffsetOldest)
 	if err != nil {
-		log.Error("topicListener panic, topic=[%s]: %s", *topic, err.Error())
+		log.Errorf("topicListener panic, topic=[%s]: %s", *topic, err.Error())
 		os.Exit(1)
 	}
 	signals := make(chan os.Signal, 1)
@@ -83,9 +83,9 @@
 		for {
 			select {
 			case err := <-consumer.Errors():
-				log.Error("Consumer error: %s", err.Err)
+				log.Errorf("Consumer error: %s", err.Err)
 			case msg := <-consumer.Messages():
-				log.Info("Got message on topic=[%s]: %s", *topic, string(msg.Value))
+				log.Infof("Got message on topic=[%s]: %s", *topic, string(msg.Value))
 			case <-signals:
 				log.Warn("Interrupt is detected")
 				os.Exit(1)
@@ -129,19 +129,19 @@
 	ln, err := net.Listen("tcp", ":9999")
 	if err != nil {
 		fmt.Println("could not listen")
-		log.Fatal("did not listen: %v", err)
+		log.Fatalf("did not listen: %v", err)
 	}
 	defer ln.Close()
 
 	connS, err := ln.Accept()
 	if err != nil {
 		fmt.Println("Accept error")
-		log.Fatal("Accept error: %v", err)
+		log.Fatalf("Accept error: %v", err)
 	}
 	conn, err = grpc.Dial(default_address, grpc.WithInsecure())
 	if err != nil {
 		fmt.Println("could not connect")
-		log.Fatal("did not connect: %v", err)
+		log.Fatalf("did not connect: %v", err)
 	}
 	defer conn.Close()
 
@@ -159,7 +159,7 @@
 
 		switch cmd {
 
-		case "attach" :
+		case "attach":
 			if len(s) < 2 {
 				newmessage = newmessage + "invalid command " + cmdstr + "\n"
 				break
@@ -175,7 +175,7 @@
 				deviceinfo := new(importer.DeviceInfo)
 				deviceinfo.IpAddress = info[0] + ":" + info[1]
 				freq, err := strconv.ParseUint(info[2], 10, 32)
-				if (err != nil) {
+				if err != nil {
 					newmessage = newmessage + "invalid command " + devinfo + "\n"
 					continue
 				}
@@ -192,7 +192,7 @@
 				ips := strings.Join(ipattached, " ")
 				newmessage = newmessage + ips + " attached\n"
 			}
-		case "delete" :
+		case "delete":
 			if len(s) < 2 {
 				newmessage = newmessage + "invalid command " + cmdstr + "\n"
 				break
@@ -210,7 +210,7 @@
 				ips := strings.Join(devicelist.Ip, " ")
 				newmessage = newmessage + ips + " deleted\n"
 			}
-		case "period" :
+		case "period":
 			if len(s) != 2 {
 				newmessage = newmessage + "invalid command " + cmdstr + "\n"
 				break
@@ -267,7 +267,7 @@
 				newmessage = newmessage + errStatus.Message()
 				fmt.Printf("Un/subscribe error - status code %v message %v", errStatus.Code(), errStatus.Message())
 			} else {
-				newmessage = newmessage + cmd +  " successful\n"
+				newmessage = newmessage + cmd + " successful\n"
 			}
 		case "showeventlist":
 			if len(s) != 2 {
@@ -320,30 +320,30 @@
 			loop = false
 			newmessage = "QUIT"
 
-			case "showdevices":
-				cmd_size := len(s)
-				fmt.Print("cmd is :", cmd, cmd_size)
-				if cmd_size > 2 || cmd_size < 0 {
-					fmt.Print("error event !!")
-					newmessage = "error event !!"
-				} else {
-					err, currentlist := GetCurrentDevices()
+		case "showdevices":
+			cmd_size := len(s)
+			fmt.Print("cmd is :", cmd, cmd_size)
+			if cmd_size > 2 || cmd_size < 0 {
+				fmt.Print("error event !!")
+				newmessage = "error event !!"
+			} else {
+				err, currentlist := GetCurrentDevices()
 
-					if err != nil {
-						errStatus, _ := status.FromError(err)
-						fmt.Println(errStatus.Message())
-						fmt.Println(errStatus.Code())
-						newmessage = errStatus.Message()
-						fmt.Print("showdevices error!!")
-					} else {
-						fmt.Print("showdevices ", currentlist)
-						newmessage = strings.Join(currentlist[:], ", ")
-					}
+				if err != nil {
+					errStatus, _ := status.FromError(err)
+					fmt.Println(errStatus.Message())
+					fmt.Println(errStatus.Code())
+					newmessage = errStatus.Message()
+					fmt.Print("showdevices error!!")
+				} else {
+					fmt.Print("showdevices ", currentlist)
+					newmessage = strings.Join(currentlist[:], ", ")
 				}
+			}
 		default:
 			newmessage = newmessage + "invalid command " + cmdstr + "\n"
 		}
-			// send string back to client
+		// send string back to client
 		connS.Write([]byte(newmessage + "\n"))
 	}
 }
diff --git a/event_subscriber.go b/event_subscriber.go
index d4b75a3..fd6e013 100644
--- a/event_subscriber.go
+++ b/event_subscriber.go
@@ -18,10 +18,10 @@
 	"bytes"
 	"encoding/json"
 	"fmt"
+	"io/ioutil"
 	"net/http"
 	"os"
 	"regexp"
-	"io/ioutil"
 )
 
 const RF_EVENTSERVICE = "/redfish/v1/EventService/"
@@ -92,7 +92,7 @@
 	return true
 }
 
-func (s *Server) get_event_types(ip string) (eventtypes []string ) {
+func (s *Server) get_event_types(ip string) (eventtypes []string) {
 	resp, err := http.Get(RF_DEFAULT_PROTOCOL + ip + RF_EVENTSERVICE)
 	fmt.Println("get_event_types")
 	if resp != nil {
diff --git a/main.go b/main.go
index 50f3c5b..4f05c88 100644
--- a/main.go
+++ b/main.go
@@ -15,13 +15,13 @@
 package main
 
 import (
-	"github.com/opencord/device-management/proto"
 	"crypto/tls"
 	"encoding/json"
 	"fmt"
 	"github.com/Shopify/sarama"
-	log "github.com/sirupsen/logrus"
 	empty "github.com/golang/protobuf/ptypes/empty"
+	"github.com/opencord/device-management/proto"
+	log "github.com/sirupsen/logrus"
 	"golang.org/x/net/context"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/codes"
@@ -47,34 +47,34 @@
 
 var DataProducer sarama.AsyncProducer
 
-var redfish_resources = [...]string{"/redfish/v1/Chassis", "/redfish/v1/Systems","/redfish/v1/EthernetSwitches"}
+var redfish_resources = [...]string{"/redfish/v1/Chassis", "/redfish/v1/Systems", "/redfish/v1/EthernetSwitches"}
 var pvmount = os.Getenv("DEVICE_MANAGEMENT_PVMOUNT")
 var subscriptionListPath string
 
-type scheduler struct  {
-	getdata *time.Ticker
-	quit chan bool
+type scheduler struct {
+	getdata    *time.Ticker
+	quit       chan bool
 	getdataend chan bool
 }
 
-type device struct  {
-	Subscriptions	map[string]string	`json:"ss"`
-	Freq		uint32			`json:"freq"`
-	Datacollector	scheduler		`json:"-"`
-	Freqchan	chan uint32		`json:"-"`
-	Eventtypes	[]string		`json:"eventtypes"`
-	Datafile	*os.File		`json:"-"`
+type device struct {
+	Subscriptions map[string]string `json:"ss"`
+	Freq          uint32            `json:"freq"`
+	Datacollector scheduler         `json:"-"`
+	Freqchan      chan uint32       `json:"-"`
+	Eventtypes    []string          `json:"eventtypes"`
+	Datafile      *os.File          `json:"-"`
 }
 
 type Server struct {
-	devicemap	map[string]*device
-	gRPCserver	*grpc.Server
-	dataproducer	sarama.AsyncProducer
-	httpclient	*http.Client
+	devicemap    map[string]*device
+	gRPCserver   *grpc.Server
+	dataproducer sarama.AsyncProducer
+	httpclient   *http.Client
 }
 
 func (s *Server) ClearCurrentEventList(c context.Context, info *importer.Device) (*empty.Empty, error) {
-	fmt.Println("Received ClearCurrentEventList\n")
+	fmt.Println("Received ClearCurrentEventList")
 	ip_address := info.IpAddress
 	_, found := s.devicemap[ip_address]
 	if !found {
@@ -93,7 +93,7 @@
 }
 
 func (s *Server) GetCurrentEventList(c context.Context, info *importer.Device) (*importer.EventList, error) {
-	fmt.Println("Received GetCurrentEventList\n")
+	fmt.Println("Received GetCurrentEventList")
 	_, found := s.devicemap[info.IpAddress]
 	if !found {
 		return nil, status.Errorf(codes.NotFound, "Device not registered")
@@ -106,9 +106,9 @@
 }
 
 func (s *Server) GetEventList(c context.Context, info *importer.Device) (*importer.EventList, error) {
-	fmt.Println("Received GetEventList\n")
+	fmt.Println("Received GetEventList")
 	eventstobesubscribed := new(importer.EventList)
-//	eventstobesubscribed.Events = s.devicemap[info.IpAddress].Eventtypes
+	//	eventstobesubscribed.Events = s.devicemap[info.IpAddress].Eventtypes
 	eventstobesubscribed.Events = s.get_event_types(info.IpAddress)
 	if eventstobesubscribed.Events == nil {
 		return nil, status.Errorf(codes.NotFound, "No events found")
@@ -133,7 +133,7 @@
 
 func (s *Server) SubsrcribeGivenEvents(c context.Context, subeventlist *importer.GivenEventList) (*empty.Empty, error) {
 	errstring := ""
-	fmt.Println("Received SubsrcribeEvents\n")
+	fmt.Println("Received SubsrcribeEvents")
 	//Call API to subscribe events
 	ip_address := subeventlist.EventIpAddress
 	_, found := s.devicemap[ip_address]
@@ -168,7 +168,7 @@
 
 func (s *Server) UnSubsrcribeGivenEvents(c context.Context, unsubeventlist *importer.GivenEventList) (*empty.Empty, error) {
 	errstring := ""
-	fmt.Println("Received UnSubsrcribeEvents\n")
+	fmt.Println("Received UnSubsrcribeEvents")
 	ip_address := unsubeventlist.EventIpAddress
 	_, found := s.devicemap[ip_address]
 	if !found {
@@ -246,7 +246,7 @@
 					b := []byte(str)
 					msg := &sarama.ProducerMessage{Topic: importerTopic, Value: sarama.StringEncoder(b)}
 					select {
-					case  s.dataproducer.Input() <- msg:
+					case s.dataproducer.Input() <- msg:
 						fmt.Println("Produce message")
 					default:
 					}
@@ -266,7 +266,7 @@
 	errstring := ""
 	for _, ip := range list.Ip {
 		if _, ok := s.devicemap[ip]; !ok {
-			fmt.Printf("Device not found ", ip)
+			fmt.Printf("Device not found %s\n ", ip)
 			errstring = errstring + "Device " + ip + " not found\n"
 			continue
 		}
@@ -305,10 +305,10 @@
 	return &empty.Empty{}, nil
 }
 
-func (s *Server) SendDeviceList(c context.Context,  list *importer.DeviceList) (*empty.Empty, error) {
+func (s *Server) SendDeviceList(c context.Context, list *importer.DeviceList) (*empty.Empty, error) {
 	errstring := ""
 	for _, dev := range list.Device {
-		ip_address:= dev.IpAddress
+		ip_address := dev.IpAddress
 		if _, ok := s.devicemap[dev.IpAddress]; ok {
 			fmt.Printf("Device %s already exists", ip_address)
 			errstring = errstring + "Device " + ip_address + " already exists\n"
@@ -320,11 +320,11 @@
 			errstring = errstring + "Device " + ip_address + " data collection frequency out of range\n"
 			continue
 		}
-		d := device {
+		d := device{
 			Subscriptions: make(map[string]string),
-			Freq: dev.Frequency,
+			Freq:          dev.Frequency,
 			Datacollector: scheduler{
-				quit: make(chan bool),
+				quit:       make(chan bool),
 				getdataend: make(chan bool),
 			},
 			Freqchan: make(chan uint32),
@@ -362,7 +362,7 @@
 }
 
 func (s *Server) GetCurrentDevices(c context.Context, e *importer.Empty) (*importer.DeviceListByIp, error) {
-	fmt.Println("In Received GetCurrentDevices\n")
+	fmt.Println("In Received GetCurrentDevices")
 
 	if len(s.devicemap) == 0 {
 		return nil, status.Errorf(codes.NotFound, "Devices not registered")
@@ -388,13 +388,13 @@
 	grpcport := ":50051"
 	listener, gserver, err := NewGrpcServer(grpcport)
 	if err != nil {
-		fmt.Println("Failed to create gRPC server: %v", err)
+		fmt.Println("Failed to create gRPC server: ", err)
 		return err
 	}
 	s.gRPCserver = gserver
 	importer.RegisterDeviceManagementServer(gserver, s)
 	if err := gserver.Serve(listener); err != nil {
-		fmt.Println("Failed to run gRPC server: %v", err)
+		fmt.Println("Failed to run gRPC server: ", err)
 		return err
 	}
 	return nil
@@ -523,9 +523,9 @@
 		Timeout: 10 * time.Second,
 	}
 
-	s := Server {
-		devicemap:	make(map[string]*device),
-		httpclient:	client,
+	s := Server{
+		devicemap:  make(map[string]*device),
+		httpclient: client,
 	}
 
 	s.kafkaInit()
