Added exceptions need to fix bug in data processing