Need to ensure `$file` doesn't contain `/` and `\\` for security reason (otherwise people will be able to read any file on your system).