add a bunch of warnings, and improve the exit codes