Handle heredocs