fixed some issues with running sql queries. adds a device correctly given a url to a correctly constructed tar gz file