diff --git a/NPLib/scripts/RootLogon.sh b/NPLib/scripts/RootLogon.sh
index 331c7abb40d22c549035410b50a2eda29a3e2817..cf24507af3483c86a3b76ab4baee66ad77958625 100755
--- a/NPLib/scripts/RootLogon.sh
+++ b/NPLib/scripts/RootLogon.sh
@@ -27,7 +27,7 @@ if [ -f ~/.rootlogon.C ];
 then
   echo 'File .rootlogon.C already exist: attempt to modified it'
   # Check if NPTOOL stuff is already in
-  SEARCH=$(grep NPTOOL ~/test.C)
+  SEARCH=$(grep NPTOOL ~/.rootlogon.C)
   echo $SEARCH
   if [ ! -n "$SEARCH" ];
   then