Program crash and data loss.Please help me!