Fixed onCancel issue for Files/Directory dialog