Added logic to break file into chunks