Add status code logging