Added log output
Added automatic detection of current platform