Extract file ignore code
Pass in copeComponent to document listener
ignore certain file events