Made this function platform independent. It had hardcoded windows-specific paths and worked only for Windows OS.