some changes to streamline the txt_to_npy script