Edited folder monitor code (not finished yet)