BUGFIX main: throw exception in case of an empty file