Add a mandatory file mode parameter to ensure_line_present