Problem with biber: file.bcf is malformed

Yo, I'm having problems in trying to load a proper bibliography containing the url. I'm trying to use biber together with an output produced by BibDesk. However I can't even run biber properly.

I'm also using TexShop (the one in MacTeX) and I have already configured my editor by changing the BibTeX Engine to biber in TeXShop>Preferences>Engine

One example of output generated by BibDesk is HoTT.bib

   @article{Kapulkin:2012rm,
Abstract = {In this largely expository paper, we construct and investigate a model of the Univalent Foundations of Mathematics in the category of simplicial sets.},
Author = {Chris Kapulkin and Peter LeFanu Lumsdaine},
Date-Modified = {2017-02-05 09:31:04 +0000},
Eprint = {1211.2851},
Month = {11},
Title = {The Simplicial Model of Univalent Foundations (after Voevodsky)},
Url = {https://arxiv.org/abs/1211.2851},
Year = {2012},
Bdsk-Url-1 = {https://arxiv.org/abs/1211.2851}}


, which looks like syntactically correct.

I'm trying to compile the file HoTT.tex. Simply for sake of completeness, I will list all the packages I need to use , document class and new commands in my .tex file. I believe they're not the problem though

   \documentclass[12pt, a4 paper, twoside]{article}
\usepackage{amssymb, amsmath, amscd, amsthm}
\usepackage{mathrsfs}
\usepackage{indentfirst}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{matrix, arrows, decorations.pathmorphing}
\usepackage{tikz-cd}
\usepackage{fancyhdr}%preciso ver depois !!!%
\usepackage[letterpaper, margin=1in]{geometry}
\usepackage{enumitem}
\usepackage{authblk}
\usepackage[sort cites=true, backend=biber]{biblatex}

\providecommand{\keywords}[1]{\textbf{\textit{Keywords---}} #1}

\keywords{Homotopy Type Theory, Categorical Logic, Homotopy Theory, Quasi-categories, \ensuremath{(\infty,1)}-categories, Higher Elementary Topoi}

\begin{document}
\nocite{*}

\bibliography{HoTT}

\end{document}


When trying to run biber I get the following error

INFO - This is Biber 2.7
INFO - Logfile is 'HoTT.blg'
ERROR - HoTT.bcf is malformed, last biblatex run probably failed. Deleted    HoTT.bbl
INFO - ERRORS: 1

• A malformed bcf indicates a faulty pdflatex run. So check for errors there. One obvious error is the misplacement of \bibliography: Use \addbibresource{HoTT.bib} in the preamble. – Ulrike Fischer Apr 9 '17 at 20:15
• @UlrikeFischer Thanks for your comment! Working now! You saved me! You can post this as an answer. By the way I have read somewhere that \addbibresource and \bibliography can be used interchangeably. – user40276 Apr 9 '17 at 20:30
• You are right, \bibliography still works as a (deprecated) alternative ... but (as Ulrike pointed out) still only in the preamble. And better not to use it, because it is officially deprecated. – Paul Stanley Apr 9 '17 at 20:39
• @PaulStanley Could you expand on why its deprecated? It's just curiosity. – user40276 Apr 9 '17 at 20:49

A malformed bcf indicates a faulty pdflatex run. So check for errors there.
One obvious error is the misplacement of \bibliography: Use \addbibresource{HoTT.bib} (or the deprecated \bibliography) with biblatex always in the preamble.