fixed the error with wrong file type loading