Exit codes are taken into proper account