put the whole feature writing attempt in a try/catch block.