Added function to check for uncommitted changes