Crash Proofing the program