Update write function
Merge branch 'master' of https://github.com/Floki/ProjetAndroidM2DL2014