Added logic for wrap data from file