Minor fixes in file processing