Bugfix sequence retrieval 

Changed some debug output from STDOUT to STDERR
Modified sequence retrieval call, added format=json option