fixed searching in empty file