Used ErpError in IO. Still need to test it
Fixed some bugs