updated unit of work module to pevent exception swallowing