updated unit tests and exception handling
Updated unit error handling for missing data and unit tests