Use string for config keys and better error rescue