E2: Fixed fileWrite always appending, thanks Divran