Are you sure that you saved the working code ?
Are you sure that you saved it with the right name ?
Are you sure that you saved it where you thought you did ?
Is there more than one file with the same name in two (or more) different places on your PC ?
Do you use any form of version control, even if it only numbering different versions so that you can go back to them ?