Fix bug not write to file in crawler