Fixed a bug in the listener waiting too long to pick up files