added fallback to APPDATA environment variable for windows