added a more controlled io loop and correct argument loop
enforced starting position at 0,0 at file_print