Check port function