Fixed error if outfile isn't specified.