Stopping Jmeter test when all users in user.csv are done

I am working on a test plan in Jmeter. I am using a concurrency Thread Group for my test and I am using a user.csv file to pass my users through it. I have set the Recycle on EOF as "False" and Stop thread on EOF as "True" as I want all the users to work only once. I set some time on "Hold Target Rate Time".

My problem is sometimes all the users are done and leaves but test doesnt stop and keeps going on as the time I have set on "Hold Target Rate Time" is more then the actual time all users took and I keep getting the this message in log file "INFO o.a.j.t.JMeterThread: Stop Thread seen for thread bzm - Concurrency Thread Group 1-8480, reason: org.apache.jorphan.util.JMeterStopThreadException: End of file:user.csv detected for CSV DataSet:users configured with stopThread:true, recycle:false ".

I want to stop the test as soon as all users are done. How should I do it. I am using a Beanshell sampler with this code:

if(${__threadNum} == 0)

But its not helping. Any suggestion?