Modify checkWhiteSpace, anytime run the function.