check file_put_contents return code