better script compiler diagnostics