Add DEBUG_JS option for better js error handling