Removed comma after last key-value pair in bwriter.