def METHOD_NAME(func):
    """Decorator on I/O functions.
    If an error is detected, force OWTF to quit properly.
    """
    def io_error(*args, **kwargs):
        """Call the original function while checking for errors.
        If `owtf_clean` parameter is not explicitely passed or if it is
        set to `True`, it force OWTF to properly exit.
        """
        owtf_clean = kwargs.pop("owtf_clean", True)
        try:
            return func(*args, **kwargs)
        except (OSError, IOError) as e:
            if owtf_clean:
                abort_framework("Error when calling '{!s}'! {!s}.".format(func.__name__, str(e)))
            raise e
    return io_error