Pilot in court over what could have been a 'catastrophic' ac