Fixing config loading file for better error checking.