changed file content creation, using bytes.Buffer now