expand buffer size and fix liveReload global variable leak