Add a partition from file function