Index: trunk/DataStoreServer/scripts/dsreg
===================================================================
--- trunk/DataStoreServer/scripts/dsreg	(revision 28789)
+++ trunk/DataStoreServer/scripts/dsreg	(revision 28800)
@@ -332,7 +332,15 @@
 
 		    if ( !-e $src or !-r $src) {
-		    	print STDERR "file $src does not exist or is not accessible\n";
+		    	print STDERR "source file $src does not exist or is not accessible\n";
 			exit $PS_EXIT_SYS_ERROR;
 		    }
+		    if ( -e $dest ) {
+		    	print STDERR "destination $dest already exists removing\n";
+			if (! unlink $dest ) {
+                            print STDERR "failed trying to unlink $dest\n";
+			    exit $PS_EXIT_SYS_ERROR;
+			}
+		    }
+
                     if ($linkfiles) {
                         if (! symlink $src, $dest) {
