Update the loader's verification messages.

Replaced `if-else` blocks with a function.