Changed the rename file to a pipe read/write stream to avoid partition bug:
Error: EXDEV, Cross-device link