added data check for writing .belns files