works on higher resolution, added failure output