fixed writing of id and neighbor attributes

also removed cout statements that slow down the writing of .bin files
significantly.