Added ability to render offscreen and save output