Fixed a bug with generating the log filepath
Refactored the way we detect the current sapi