Check file input validity.

Added code that makes sure the file containing events is present and
that the program doesn't try to deserialize it if it's empty.