compute api: added better error message, fix header printing