Factor out opens of watch filedescriptors to a separate functions