Test toFile() return (promise) value