Improve files handling in http worker.