open file error - javascript syntax