fixed writePath