Fixed error msg reporting