diff --git a/bin/libbfa.sh b/bin/libbfa.sh
index cb2743ce6d3d036fef819734add1634e8fc3b2f8..d560c9bdba66531bc5d1a07049c0e35b6ba948ff 100644
--- a/bin/libbfa.sh
+++ b/bin/libbfa.sh
@@ -182,7 +182,7 @@ fi
 # BFAACCOUNT
 if [ -z "$BFAACCOUNT" ]
 then
-    if [ ! -d "${BFANODEDIR}/keystore" ]
+    if ! ls -1d ${BFANODEDIR}/keystore/*--* >/dev/null 2>&1
     then
         echo "No accounts found. Creating a new one (they are free)."
         geth --cache 0 --datadir ${BFANODEDIR} --password /dev/null account new