added exception files and updated on code

added exception files and updated on code