Now it works with files well