some basic robustness and logging