Fixed error with checking wrong file