When should you apply for a loan?