API to cancel monitoring a file.