Update error string and address compiler warnings