changed listener structure for monitoring files
seperated concerns