diff --git a/UD_any/train.sh b/UD_any/train.sh
index 265662b3884225d1e8f0517a8925cc7122261d5a..94f4b50df2098be02311d91a2439694cfeda55a3 100755
--- a/UD_any/train.sh
+++ b/UD_any/train.sh
@@ -34,6 +34,9 @@ fi
 
 source $EXPPATH"/config"
 
+CURDIR=$(pwd)
+cd $EXPPATH"/"data && make -s clean && make -s && cd $CURDIR
+
 TRAIN=$(find $CORPUS -type f -name '*train*.conllu')
 TRAINRAW=$(find $CORPUS -type f -name '*train*.txt')
 DEV=$(find $CORPUS -type f -name '*dev*.conllu')
@@ -57,8 +60,14 @@ then
   print_usage_and_exit
 fi
 
-CURDIR=$(pwd)
-cd $EXPPATH"/"data && make -s clean && make -s && cd $CURDIR
+if [ "$MODE" = "txt" ]; then
+if test ! -f $TRAINRAW;
+then
+  >&2 echo "ERROR : no train file found in" $CORPUS
+  >&2 echo "$TRAINRAW"
+  print_usage_and_exit
+fi
+fi
 
 MCD=$EXPPATH"/data/*\.mcd"