add main check when running script