sorry for late reply. I have attached the pics. When on putting "Serial.println("worked");" under first 'if' statement, it prints 'worked worked worked........' continuously without scanning the card.