Refactor buffer config for file monitoring