initial code of hotfolder.py