add multiple buffer file
add Condition for multiple buffer
updated Condition
updated implementation of multiple buffer