initialize and set exit codes