Throw exceptions when reading lines from a file which are not there

to prevent NullPointerExceptions, among others.

Signed-off-by: Daniel Borchmann <daniel.borchmann@mailbox.tu-dresden.de>