The Court may, whenever it thinks fit, direct that a person unlawfully or improperly detained in public or private custody in the State or within the limits of its jurisdiction be set free.