@Override
    public ExchangeRate load(Currency to) {
        BufferedReader exchangereader = null;
        try {
            exchangereader = new BufferedReader(new FileReader(file));
            String line;
            while((line = exchangereader.readLine()) != null){
                String[] rateLine = line.split("=");
                if(rateLine[1].equalsIgnoreCase(to.getCode())){
                    return new ExchangeRate(to,Double.valueOf(rateLine[0]));
                }
            }
            return null;
        } catch (FileNotFoundException ex) {
            Logger.getLogger(FileExchangeRateLoader.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(FileExchangeRateLoader.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            try {
                exchangereader.close();
            } catch (IOException ex) {
                Logger.getLogger(FileExchangeRateLoader.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return null;
    }