Fixed some stuff

I think that's it for scanFile bugs.