Debug main script