ATmega8 with bootloader loses the program

Hello. I have loaded the arduino bootloader on the ATmega8 and ater I load the sketch it runs smooth.
The sketch is a "Hello World" LCD test.

After a couple of days the program does not load at all and I need to re-upload it, but the bootloader is fine.

I use a 16MHz crystal with 2 18pico capacitors, 100nF capacitor on the VCC to GND close to the uC, 100nF capacitor on the AVCC to GND also close to chip, 7805 regulator with 220uF on the 12v side and 100uF on the 5v side along withn 100nF ceramic caps.

The pin1 is connected to 10Kohm resistor and the resistor to the +5v.

I don not know where is the problem, and I dont know what to do. Is there some way to "lock" the uploaded code?
Can you suggest me some solution ?
Thank you

That should be impossible. Once your sketch is in flash, it should stay there.

If you have some sort of device programmer (you must have, since you loaded the bootloader), it would be interesting to read out the microcontroller contents after it is "failing" and see what is actually there, compare to what is supposed to be there.
(actually, you should be able to do that with the bootloader, too.)

I upload the sketch using the basic ftdi breakout board.
I dont know what goes wrong.

Maybe is that becasue i touch the board with my hands while it is powered and I somehow reset it ?