Added log4j

Added log4j to use instead of System.out.println and printStackTrace().
Added better handling in case the YQL service can't be reached.