cli: prevent segfault if input file failed to open