[test] fix __filename test
[refactor] use console.warn instead of console.error to warn about sync request