Add if main for node script