Removed unnecessary HDFS access to determine end of file