Ensure that the code's indentation is removed before the end token to maintain proper formatting. Alternatively, use the <<- operator and indent with tabs for consistency.