Long-term debt
12 Months Ended
Dec. 31, 2019
Long-term Debt, Unclassified [Abstract]  
Long-term debt
Long-term debt
    
In April 2018, the Company entered into an amended and restated loan and security agreement with Hercules Capital, Inc. ("Hercules"), which was subsequently amended in November 2019 (as amended, the "2018 Term Loan"). The 2018 Term Loan provides a $14.0 million term loan. The 2018 Term Loan matures on May 1, 2021 and accrues interest at a floating rate per annum equal to the greater of (i) 8.00%, or (ii) the sum of 3.00% plus the prime rate. The 2018 Term Loan provides for interest-only payments until January 1, 2021. Thereafter, payments will include equal installments of principal and interest through maturity. The 2018 Term Loan may be prepaid subject to a prepayment charge. The Company is obligated to pay an end of term charge of $1.0 million at maturity. The Company evaluated the November 2019 amendment to the 2018 Term Loan and concluded that it was a modification pursuant to ASC 470-50, Debt (Topic 470).

The 2018 Term Loan is secured by a lien on substantially all assets of the Company, other than intellectual property. Hercules has a perfected first-priority security interest in certain cash, cash equivalents and investment accounts. The 2018 Term Loan contains non-financial covenants, representations and a Material Adverse Effect provision. There are no financial covenants. A "Material Adverse Effect" means a material adverse effect upon: (i) the business, operations, properties, assets or condition (financial or otherwise) of the Company; (ii) the ability of the Company to perform the secured obligations in accordance with the terms of the loan documents, or the ability of agent or lender to enforce any of its rights or remedies with respect to the secured obligations; or (iii) the collateral or agent’s liens on the collateral or the priority of such liens. Any event that has a Material Adverse Effect or would reasonably be expected to have a Material Adverse Effect is an event of default under the Loan Agreement and repayment of amounts due under the Loan Agreement may be accelerated by Hercules under the same terms as an event of default. As of December 31, 2019, the Company was in compliance with all covenants of the 2018 Term Loan. The 2018 Term Loan is automatically redeemable upon a change in control. The Company believes acceleration of the repayment of amounts outstanding under the loan is remote, and therefore, the debt balance is classified according to the contractual payment terms at December 31, 2019.

In connection with a previously issued term loan in 2014 the Company issued common stock warrants to Hercules which expired unexercised in November 2019. In connection with the 2018 Term Loan, the Company issued common stock warrants to Hercules (the “Hercules Warrant”). See Note 9. Warrants.

As of December 31, 2019 and 2018, the Company had outstanding borrowings of $13.4 million and $14.8 million, respectively. During the years ended December 31, 2019 and 2018, the Company made payments of $1.9 million and $0.5 million on its long term debt. Interest expense was $1.6 million and $1.7 million for the years ended December 31, 2019 and 2018, respectively.

Future principal payments, including the End of Term Charges, are as follows (in thousands):
 
December 31,
 
2019
2020
$

2021
13,960

Total
$
13,960