ltr: add width, height flags, improve error handling