Added if to treat the case where a file is moved out of the monitored folder on linux

Added if to treat the case where a file is moved out of the monitored folder on linux