Supporting require; Fixed path.resolve issue