add '__name__' check

add '__name__' check, compare with '__main__'