Template based bufferedfile implemented