Index: trunk/Nebulous/scripts/ptest.pl
===================================================================
--- trunk/Nebulous/scripts/ptest.pl	(revision 12974)
+++ trunk/Nebulous/scripts/ptest.pl	(revision 13053)
@@ -26,10 +26,10 @@
 
         close $fh;
-        $neb->unlock( $fname, 'write' );
 
         $fh = $neb->open( $fname, 'read' ) or die "can't open file";
         close $fh;
+
+        $neb->lock( $fname, 'read' );
         $neb->unlock( $fname, 'read' );
-
         $neb->replicate( $fname );
         $neb->cull( $fname );
