format and amend error messages for dependency libraries