New exception handling

Updated program.cs to have some better exception handling. C