def write_file(path, content):
    """
    writes data to a given file
    :param path: file path
    :param content: content to be written in the file
    :return: file path and status
    """
    try:
        _file = open(path, "w+")
        _file.write(content)
        _file.close()
    except EnvironmentError as e:
        print("File operation failed\nError: %s" % e)
        return "", -1
    return path, 0