If Not Empty Array Javascript Append File