Added exception handling to main functions.
Updated readme file.