fix bug: fix fpath is endswith js, not add .js