write bneck to file