fix cuda code, change file io to binary (getting that working on windows is left as an exercise)