Change old file_put_contents() to $->save()