move whole text file API to Spark core