fix NullPointerException in OutputFile

the NPE hided other errors that occured in open() (like
FileNotFoundExceptions)