I find different problems when using Folder.Add method during run

Set App = CreateObject("QuickTest.Application")
App.Folders.Add "c:\my project\",-1
htmlreporter "pass","hi","mercury"

1. Sometimes while running i get run time error. This error i'm
not able to reproduce always. Let me know what it could be

2. I have a function htmlreporter written in vbs file whose path is
resolved during run time. This means

path lib. file appearing in test->setting is ".\library file\temp.vbs"
during runtime i add the relative path(var_path) in folder.
i get typemismatch error while running for the first time or whenever
run the script after removing var_path.

Looking for immediate help