fix AFP digitization setup with CA
Fixing some unfortunate changes introduced by !53558 (merged): changed errors back to fatals; fix possible double initialization; put testing macro to a separate file.
Edited by Petr Balek
Fixing some unfortunate changes introduced by !53558 (merged): changed errors back to fatals; fix possible double initialization; put testing macro to a separate file.