Added bulk_write to python binding, fixed some errors