Long-term debt | Note 7. Long-term debt Long-term debt at the indicated dates consists of the following: June 30, December 31, 2017 2016 (in thousands) Deerfield senior secured credit facility, net of discount of $3,246 and $1,401, respectively $ $ Senior secured convertible notes due June 1, 2018, net of discount of $606 — Capital leases, maturing through June 2020 Less current portion ) Long-term debt $ $ Senior secured credit facility: On May 11, 2016, the Company entered into a $60.0 million senior secured credit facility (“Facility”) with Deerfield Private Design Fund III, L.P. (66 2/3% of loan) and Deerfield Special Situations Fund, L.P. (33 1/3% of Loan) (“Deerfield”), as lenders. On February 8, 2017, the Company closed an underwritten public offering of 5,750,000 shares of its common stock at a public offering price of $5.00 per share, which includes 750,000 shares of the Company’s common stock resulting from the underwriters’ exercise of their over-allotment option at the public offering price on February 17, 2017 (see Note 8). Deerfield, the Company’s senior lender, participated in the purchase of the Company’s common shares as part of this public offering, and as a result, is now classified as a related party. Approximately $33 million of the $60 million Facility proceeds was used to prepay the existing $24.3 million principal and $0.1 million of accrued interest related to the senior Loan and Security Agreement (“LSA”) with Hercules Technology III, L.P., (“Hercules”), the $1.1 million LSA end of term fee, an LSA prepayment charge of $243,000 and the $5.9 million of principal and $1.3 million of interest on the 10% related party amended and restated subordinated note (“Note”) that was issued by the Company to Essex Capital Corporation (“Essex”), which were otherwise payable in 2016 and 2017. Principal on the Facility is due in three equal annual installments beginning in May 2019 and continuing through May 2021, with a final payment of principal, interest and all other obligations under the Facility due May 11, 2022. Interest is due quarterly beginning in June 2016, at a rate of 12.95% per year. The Company had an option, which it exercised, to defer payment of each of the first four interest payments, adding such amounts to the outstanding loan principal. The aggregate $6.6 million in deferred interest payments (“Accrued Interest”) was to be paid in cash on June 1, 2017. Borrowings under the Facility are collateralized by substantially all of the Company’s assets, except the assets under capital lease, and the Company will maintain cash on deposit of not less than $5.0 million. On June 1, 2017 (the “Amendment Date”), the Company and Deerfield entered into a First Amendment (the “Amendment”) to the Facility which extended the date to repay the Accrued Interest under the Facility to June 1, 2018 (the “PIK Maturity Date”), which may be extended to June 1, 2019 at the election of the Company if certain conditions have been met as specified in the Amendment. The right to payment of the Accrued Interest was memorialized in the form of Senior Secured Convertible Notes (the “Convertible Notes”) issued to Deerfield on the Amendment Date. Interest is due quarterly at a rate of 12.95% per year. The principal amount of the Convertible Notes issued under the Amendment and all accrued and unpaid interest thereon shall become due and payable upon written notice from Deerfield, and if either (a) the Company does not meet certain quarterly sales milestones specified in the Amendment or (b) the Company has not received and publicly announced FDA approval of the new drug applications on or before the applicable PDUFA goal date as set forth on the schedules to Amendment. Per the Amendment, the Company will prepay all of the outstanding obligations under the Facility and the Convertible Notes upon the occurrence of a change in control or a sale of substantially all of the Company’s assets and liabilities. The Amendment increased the staggered prepayment fees for prepayments due upon a change of control or any other prepayment made or required to be made by the Company by 300 basis points from June 1, 2017 through the period ending prior to May 11, 2020 for the change in control prepayment fees and through the period ending prior to May 11, 2022 for any other prepayments, respectively (the “Prepayment Premiums”). Such Prepayment Premiums, as amended, range from 12.75% to 2%. The $6.6 million of Convertible Notes may be converted into shares of the Company’s common stock at the noteholder’s option at any time up to the close of business on the date that is five days prior to the PIK Maturity Date. The per share conversion price will be the greater of (a) 95% of the average of the volume weighted average prices per share of the Company’s common stock on the NASDAQ Global Market for the three trading day period immediately preceding such conversion, and (b) $7.00. Deerfield cannot own more than 9.985% of the Company’s outstanding shares at any one time, and the aggregate conversion cannot exceed 19.9% of the Company’s outstanding common stock as of June 1, 2017. In conjunction with the Amendment to the Facility and the related issuance of the Convertible Notes, the Company entered into a Registration Rights Agreement (“Registration Agreement”) which required the Company to file a registration statement with the SEC to register the shares of common stock issued or issuable upon conversion of the Convertible Notes (“Conversion Shares”) (subject to certain adjustment for stock split, dividend or other distribution, recapitalization or similar events, “Registrable Securities”) (See Note 7) within 30 days from June 1, 2017, which is to become effective per the SEC no later than 75 days thereafter. Such filing was made on June 30, 2017 and became effective on July 11, 2017. This filing covered 940,924 shares, which is the number of shares that would be issued at the floor conversion rate of $7.00 per share. The Company is also required to, among other things, maintain the effectiveness of such registration statement, continue to file the required SEC filings on a timely basis, use its best efforts to ensure that the registered securities are listed on each securities exchange on which securities of the same class or series as issued by the Company are then listed and comply with any FINRA requests. The Company’s obligations with respect to each registration end at the date which is the earlier of (a) when all of the Registrable Securities covered by such registration have been sold or (b) when Deerfield or any of its transferee or assignee under the Registration Agreement cease to hold any Registrable Securities. For each registration, the Company shall bear all reasonable expenses, other than underwriting discounts and commissions, and shall reimburse Deerfield or any assignee or transferee for up to $25,000 in legal fees. The Company currently expects to satisfy all of its obligations under this Registration Agreement and does not expect to pay any damages pursuant to this agreement; therefore, no liability has been recorded (See Note 11). The Company has accounted for the Amendment as a debt modification as the instruments were not substantially different; therefore, the remaining debt discount on the original Facility is being amortized using the effective interest method over the remaining term of the modified debt. The Company evaluated the Amendment together with the Convertible Notes to determine if those contracts or embedded components of those contracts qualified as derivatives requiring separate recognition. This evaluation identified a derivative liability of $2.0 million for the fair value of the change in control and other accelerated payment features as the prepayment fees resulted in premiums that were greater than 10% (see Note 4). As the change in control and other accelerated payments terms, including the prepayment fees, were applied to the entire debt per the terms of the amended Facility, the corresponding debt discount will be amortized using the effective interest method over the remaining term of the Facility. The fees paid to or on behalf of the creditor for the debt modification totaled $40,000 and were recorded as additional debt discount on the amended Facility to be amortized to interest expense using the effective interest method over the term of the Facility. The Company’s evaluation also determined that the embedded conversion options should not be bifurcated as derivatives from the Convertible Notes host instruments. Therefore, the Company recorded a $0.6 million discount to the convertible notes for the intrinsic value of the embedded conversion option based upon the difference between the fair value of the underlying common stock on June 1, 2017 and the effective conversion price embedded in the Convertible Notes, which will be amortized using the effective interest method to interest expense over the one year term of the Convertible Notes. The Company recorded a $0.6 million corresponding credit to a beneficial conversion feature classified as additional paid in capital in stockholders’ equity (deficit) in the Company’s financial statements. In connection with the Facility, the Company paid a $1,350,000 yield enhancement fee to Deerfield, approximately $173,000 of legal costs to the Company’s attorneys and $58,000 of legal costs on behalf of Deerfield’s attorneys, all of which were recorded as debt discount and amortized over the six-year term of the Facility, using the effective interest method. Borrowings under the Facility are collateralized by substantially all of the Company’s assets, except the Company’s assets under capital lease, and the Company will maintain cash on deposit of not less than $5.0 million. Pursuant to the Convertible Notes, if the Company shall fail to provide the number of conversion shares, then the Company shall pay damages to Deerfield or subsequent holder or any designee (“Holder”) for each day after the third business day after receipt of notice of conversion (“Share Delivery Date”) that such conversion is not timely effected. The Facility also contains certain customary nonfinancial covenants, including limitations on the Company’s ability to transfer assets, engage in a change of control, merge or acquire with or into another entity, incur additional indebtedness and distribute assets to shareholders. Upon an event of default, the lenders may declare all outstanding obligations accrued under the Facility to be immediately due and payable, and exercise its security interests and other rights. As of June 30, 2017, the Company was in compliance with the covenants under the Facility and the Convertible Notes. Debt discount amortization for the Facility, including the Amendment after June 1, 2017, was calculated using the effective interest rates of 15.03% on the original facility debt and 23.80% on the Convertible Notes, charged to interest expense and totaled $163,000 and $245,000 for the three and six months ended June 30, 2017, respectively, and $36,000 for both the three and six months ended June 30, 2016. Senior debt: In March 2014, the Company entered into the LSA, which was subsequently amended in August 2014, September 2014, December 2014 and June 2015. As amended, the LSA provided a total commitment of $25.0 million, available in four draws. Borrowings under the LSA were collateralized by substantially all of the Company’s assets, except the Company’s intellectual property and assets under capital lease. The first draw of $10.0 million, (“Tranche 1”), was issued during March 2014 and was used in its entirety to repay outstanding principal under a previous credit facility. The second draw of $5.0 million, (“Tranche 2”), was issued during September 2014. The third draw (“Tranche 3”) in the amount of $5.0 million was issued in March 2015. In June 2015, the fourth and final draw of $5.0 million, (“Tranche 4”), was issued prior to meeting the Tranche 4 milestones, which were met in July 2015. Each draw was to be repaid in monthly installments, comprised of interest-only monthly payments until May 2016, when installments of interest and principal calculated over a thirty-month amortization period commenced. A balloon payment of the entire principal balance outstanding on October 1, 2017 and all accrued but unpaid interest thereunder was due and payable on October 1, 2017. The interest rate was 9% per annum for Tranche 1 and Tranche 4 and 10.5% per annum for Tranche 2 and Tranche 3. An end of term charge of $1.1 million was payable at the earliest to occur of (1) October 1, 2017, (2) the date the Company prepaid its outstanding Secured Obligations, as defined therein, or (3) the date the Secured Obligations became due and payable. As such, the end of term charge of $1.1 million was paid on May 11, 2016 when the Company prepaid its outstanding Secured Obligations, as defined therein. In connection with the LSA, the Company issued the Hercules Warrants which consisted of 60,000 Series C warrants in March 2014 and 110,000 Series C warrants in September 2014 at the then current price of $5.00 per share. The Hercules Warrants became warrants with a term of five years for the purchase of 70,833 shares of common stock at a price of $12.00 per share upon the closing of the Company’s IPO and were therefore reclassified from warrant liability to Additional Paid in Capital within Stockholders’ Equity at July 22, 2015. LSA end of term charge amortization totaled $38,000 and $121,000 for the three and six months ended June 30, 2016, respectively. LSA debt discount amortization charged to interest expense totaled $33,000 and $104,000 for the three and six months ended June 30, 2016, respectively. The early prepayment of the LSA with some of the proceeds from the Facility resulted in a $1,187,000 loss on debt extinguishment which is separately shown in the consolidated statement of operations for the three and six months ended June 30, 2016. 10% subordinated related party note: The Company had a Note in the aggregate principal amount of $5.9 million that was issued by the Company to Essex which was to mature in March 2017. Interest was to be accrued and added to the principal balance until such time as the Company achieved positive EBITDA for three consecutive months. During the three and six months ended June 30, 2016, interest expense of $87,000 and $263,000, respectively, was accrued. On May 11, 2016, the Company prepaid the $5.9 million outstanding aggregate principal and $1.3 million in accrued and unpaid interest. Capital lease obligations to related party: As described in Notes 6 and 13, during the six months ended June 30, 2017 and the years ended December 31, 2014 and 2013, the Company entered into agreements with a related party for the sale-leaseback of existing and newly acquired assets with a total capitalized cost of $3.2 million, $795,000 and $5.5 million, respectively, which are classified as capital leases. The approximate imputed interest rate on these leases is 14.9%, 14.5% and 14.5%, respectively. Interest expense on these leases was $22,000 and $42,000 for the three and six months ended June 30, 2017, respectively, and $61,000 and $139,000 for the three and six months ended June 30, 2016, respectively. Future principal payments of long-term debt including capital leases are as follows: Period ending: June 30, (in thousands) 2018 $ 2019 2020 2021 2022 Future principal payments $ Less unamortized debt discount related to long-term debt ) Less current portion of long-term debt ) Total long-term debt $ |