parseFromFile and parseFromBuffer handles wrong parameters