public static boolean fileIsItunesLibrary(String libraryFilename, StatusUpdateLogger logger)
    {
    	if (logger == null)
    	{
    		logger = new NullStatusUpdateLogger();
    	}
    	
        logger.debug("Looking for iTunes library at: " + libraryFilename);
        
        if (libraryFilename == null || libraryFilename.equals(""))
        {
        	logger.warn("LibraryFilename is empty or null.", null, true);            
            return false;
        }
        
        File libraryFile = new File(libraryFilename);
        if (libraryFile == null)
        {
            logger.warn("LibraryFile object wasn't created.", null, true);
            return false;
        }
        
        if (libraryFile.exists() == false)
        {
            logger.debug("File does not exist: " + libraryFilename);
            return false;
        }
        
        if (libraryFile.isFile() == false)
        {
        	logger.debug("File is not a file (probably a directory): " + libraryFilename);
            return false;
        }
        
        if (libraryFile.canRead() == false)
        {
            logger.warn("File is not readable (check permissions): " + libraryFilename, null, true);
            return false;
        }
        
        try
        {
        	//test if file looks like a library (debug print error)
        	return verifyItunesLibrary(libraryFilename, logger);
        }
        catch (Exception e)
        {
        	logger.error("Exception occurred while trying to verify file \"" + libraryFilename + "\" is an itunes library:" + e.getMessage(), e, true);
        	return false;
        }
    }