def import_book(book_file, lowercase=True):
    """
    Reads a text file (and optionally converts to lowercase),
    returning a string with all the content.
    """
    try:
        with open(book_file, 'r') as book:
            text = book.read()
            text = text.lower()
            return text
    except (FileNotFoundError, PermissionError):
        message = 'There was a problem importing the book.\n'
        message += 'Please, check the path and permissions.'
        raise UserWarning(message)