Fixed file writer
Merge branch 'master' into 1.0