fix in php platform, directory may already exist