Solved a small bug where the file wasn't saved, cause write wasn't never done.