Added functionality so that the script can filter errors based on a predefined list provided by the user.