Updated script to work with unknow partion numbers