converted file write to WP_Filesystem