adding check_error() method, planning to use it to check for errors when sourcing configs, but because of how it works, the exit code is always the one from the last command run, not the source itself