Fixed some bugs and added delete device functionality
fixed error in export path
Some more logging refinement