First version that works by processing *complete files*