private boolean rewriteFreeSpace(){
        PrintWriter free;
        try {
            free = new PrintWriter(freeSpace); //new FileWriter(pointerStorage, true)
        } catch (Exception e) {
            System.out.println("Can't open free space Storage");
            return false;
        }
        try{
            free.write("");
            for(Long pos : freePointers.keySet()){
                free.append(pos + "-" + freePointers.get(pos) + ";");
            }
        } catch (Exception e){
            System.out.println("Write error");
            return false;
        }
        finally {
            free.close();
        }
        return true;
    }