Updated error handling

Updated error handling, added nuget packages configuration