public Labyrinth toLaby(String file) {
        try (
                FileInputStream fInputStream = new FileInputStream(new File(file));
        ) {
            ObjectInputStream oisCompressed = new ObjectInputStream(fInputStream);
            Labyrinth laby = (Labyrinth) oisCompressed.readObject();
            laby.resolve();
            return laby;
        } catch (FileNotFoundException e) {
            System.out.println("File not found !");
            return null;
        } catch (StreamCorruptedException e) {
            System.out.println("Corrupted file !");
            return null;
        } catch (Exception e) {
            System.out.println("Unknown error !");
            return null;
        }
    }