resort exception handling in writebfids