Change debug message to warning
Improve visual studio compatibility