Add Improvement for PRP and Fix mkdir() file exists warning

- Fix mkdir file exists warning, add filexist checking before calling
mkdir.
- Add special handling for PRP.