added buffer file interface.