diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c
index edb725a..7754860 100644
--- a/bgpd/bgp_dump.c
+++ b/bgpd/bgp_dump.c
@@ -95,6 +95,7 @@
 bgp_dump_open_file (struct bgp_dump *bgp_dump)
 {
   int ret;
+  int fd;
   time_t clock;
   struct tm *tm;
   char fullpath[MAXPATHLEN];
@@ -131,6 +132,16 @@
       umask(oldumask);
       return NULL;
     }
+  else
+    {
+      fd = fileno(bgp_dump->fp);
+      ret = flock( fd, LOCK_EX );
+      if (ret != 0)
+	{
+	  zlog_warn ("bgp_dump_open_file: Unable to flock() file %s: %s", realpath, strerror (errno));
+	}
+    }
+
   umask(oldumask);  
 
   return bgp_dump->fp;
@@ -195,6 +206,7 @@
 static void
 bgp_dump_routes_index_table(struct bgp *bgp)
 {
+  int ret;
   struct peer *peer;
   struct listnode *node;
   uint16_t peerno = 0;
@@ -266,7 +278,11 @@
 
   bgp_dump_set_size(obuf, MSG_TABLE_DUMP_V2);
 
-  fwrite (STREAM_DATA (obuf), stream_get_endp (obuf), 1, bgp_dump_routes.fp);
+  ret = fwrite (STREAM_DATA (obuf), stream_get_endp (obuf), 1, bgp_dump_routes.fp);
+  if (ret != 1)
+    {
+      zlog_warn ("bgp_dump_routes_index_table: fwrite returned %d, expected 1: %s", ret, strerror (errno));
+    }
   fflush (bgp_dump_routes.fp);
 }
 
@@ -275,6 +291,7 @@
 static unsigned int
 bgp_dump_routes_func (int afi, int first_run, unsigned int seq)
 {
+  int ret;
   struct stream *obuf;
   struct bgp_info *info;
   struct bgp_node *rn;
@@ -373,8 +390,11 @@
       seq++;
 
       bgp_dump_set_size(obuf, MSG_TABLE_DUMP_V2);
-      fwrite (STREAM_DATA (obuf), stream_get_endp (obuf), 1, bgp_dump_routes.fp);
-
+      ret = fwrite (STREAM_DATA (obuf), stream_get_endp (obuf), 1, bgp_dump_routes.fp);
+      if (ret != 1)
+        {
+          zlog_warn ("bgp_dump_routes_func: fwrite returned %d, expected 1: %s", ret, strerror (errno));
+        }
     }
 
   fflush (bgp_dump_routes.fp);
@@ -464,6 +484,7 @@
 void
 bgp_dump_state (struct peer *peer, int status_old, int status_new)
 {
+  int ret;
   struct stream *obuf;
 
   /* If dump file pointer is disabled return immediately. */
@@ -484,7 +505,11 @@
   bgp_dump_set_size (obuf, MSG_PROTOCOL_BGP4MP);
 
   /* Write to the stream. */
-  fwrite (STREAM_DATA (obuf), stream_get_endp (obuf), 1, bgp_dump_all.fp);
+  ret = fwrite (STREAM_DATA (obuf), stream_get_endp (obuf), 1, bgp_dump_all.fp);
+  if (ret != 1)
+    {
+      zlog_warn ("bgp_dump_state: fwrite returned %d, expected 1: %s", ret, strerror (errno));
+    }
   fflush (bgp_dump_all.fp);
 }
 
@@ -492,6 +517,7 @@
 bgp_dump_packet_func (struct bgp_dump *bgp_dump, struct peer *peer,
 		      struct stream *packet)
 {
+  int ret;
   struct stream *obuf;
 
   /* If dump file pointer is disabled return immediately. */
@@ -520,7 +546,11 @@
   bgp_dump_set_size (obuf, MSG_PROTOCOL_BGP4MP);
 
   /* Write to the stream. */
-  fwrite (STREAM_DATA (obuf), stream_get_endp (obuf), 1, bgp_dump->fp);
+  ret = fwrite (STREAM_DATA (obuf), stream_get_endp (obuf), 1, bgp_dump->fp);
+  if (ret != 1)
+    {
+      zlog_warn ("bgp_dump_packet_func: fwrite returned %d, expected 1: %s", ret, strerror (errno));
+    }
   fflush (bgp_dump->fp);
 }
 
