fail graceful if file or url are not JSON