added error handling to investment controller so lender can't invest more than available funds