diff --git a/grab/base.py b/grab/base.py
index <HASH>..<HASH> 100644
--- a/grab/base.py
+++ b/grab/base.py
@@ -458,7 +458,7 @@ class Grab(LXMLExtension, FormExtension, PyqueryExtension,
             #raise IOError('Response code is %s: ' % self.response_code)
 
         if self.config['log_file']:
-            with open(self.config['log_file'], 'w') as out:
+            with open(self.config['log_file'], 'wb') as out:
                 out.write(self.response.body)
Change file open mode in log_file option