added show exit codes on functions