Add diagnostics and fix filesystem event continually firing.