Can you make this cross platform compatible (use File.toUri().toString()) ?