add robustness with the file code

- Check if the file exists before sending it to the playground
- clean the path according to OS' DIRECTORY_SEPARATOR