added platform check to enable debug