When there is an issue, the recourse is to add serial.prints to gain info about the various conditions of your program. When the program is working, I take the serial prints out for increased program performance.
This is your stated issue. At first glance at your code, besides some cleaning up I did not see why. Thus a request for serial prints so that you can get more info.
OI! crap.... My oopsie.
I completely missed that. Let me ask you Is 3000 greater then 6000? You put the program to sleep for 6 seconds. You should not mix millis() and delay().