refactored code to be able to set kepler and smalln
additional debug info on fi error condition