private boolean rewriteKeys(){
        PrintWriter keys;
        try {
            keys = new PrintWriter(pointerStorage);
        } catch (Exception e) {
            System.out.println("Can't open pointers Storage");
            return false;
        }
        try{
            keys.write("");
            for(String key : keyPointers.keySet()){
                keys.append(key + "-" + keyPointers.get(key) + ";");
            }
        } catch (Exception e){
            System.out.println("Write error");
            return false;
        }
        finally {
            keys.close();
        }
        return true;
    }