Fix bugs, handle exceptions better and restyle code.

- Add `config.flatten` method to get the raw dict from config
- Use the `flatten` method to pass raw config to `_transform_params`
- Remove unncessary `print` statements
- Add exception handling for `validate_stack` method to spit out
  useful information
- Validate stack must return a `False` triplet when validation fails.
- Use `child_file` method where needed.