Because a firewall examines every packet in a session, a firewall can detect application errors. A firewall functions as a shield against unwanted programs by identifying a program's behavior and reputation. It serves as a checkpoint for an application. When once detected, the application will be subject for inspection and qualification.