I want my custom node to print the message like file is created in the debug node how can i do this
Just log your message.
See this for reference:
https://nodered.org/docs/creating-nodes/node-js#logging-events
Note: you will only see log messages with level warning and above in the debug sidebar