thread-safe! only file's folder processed