Implement safety checks + fill config.h