Move log.go into separate package