In a costly state verification model under commitment, the principal may acquire a costly public and imperfectly revealing signal before or after contracting. If the project remains profitable after all signal realizations, optimally the signal is collected, if at all, only after contracting, and it may be acquired randomly or deterministically. Moreover, audit is deterministic and targeted on some signal-state combinations. The paper provides a detailed characterization of the optimal contract and performs a comparative static analysis of signal acquisition strategy and payoffs with respect to enforcement costs and informativeness of the signal. We explore the robustness of the results, including commitment issues. The results are interpreted in light of the observed features of financial contracts, showing that the optimality of the standard debt contract with deterministic audit extends to a setting with random audit.