diff --git a/printer/printer.py b/printer/printer.py
index c693191..b27e78e 100755
--- a/printer/printer.py
+++ b/printer/printer.py
@@ -19,16 +19,16 @@ def on_connect(client, userdata, flags, rc):
 def on_message(client, userdata, msg):
     print("Print")
     with open("printer/locations.txt") as locations:
-    lines = locations.read().splitlines()
-    location = random.choice(lines)
+        lines = locations.read().splitlines()
+        location = random.choice(lines)
 
-with open("printer/actions.txt") as actions:
-    lines = actions.read().splitlines()
-    action = random.choice(lines)
+    with open("printer/actions.txt") as actions:
+        lines = actions.read().splitlines()
+        action = random.choice(lines)
 
-with open("printer/adverbs.txt") as adverb:
-    lines = adverb.read().splitlines()
-    adverb = random.choice(lines)
+    with open("printer/adverbs.txt") as adverb:
+        lines = adverb.read().splitlines()
+        adverb = random.choice(lines)
 
     if random.randint(0,1):
         im=Image.open("printer/image.jpg")