add exit trap to ensure exit code will always be 0