pathname detection