Bugfix : file write