Error management added