use file_put_contents directly