New File Creation using Command Plugin under project directory

Hi team, 

  I am working with CommandPlugin and with the help of command plugin I can able to create files inside my Package directory but I want to create a file in my project directory but whenever I try to create new file outside Package directory it is saying like there is no permission to create a file in this folder. Is this possible to create new file inside project directory using CommandPlugin ? Can you please help me for this ? I am struggling on this more than a week. Eagerly waiting for you kind support. Thank you so much.

Scenario,

1.Able to Crete new file inside Package directory,

2.Facing permission issues - while creating new files inside project directory with the help of CommandPlugin

Issue:

Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file file.txt in the folder ProjectFolder