Improve program check (Issue #12)