added some error handling for http calls, sorted view for files in folders