logging and documenation added,exception generation and handling in cd