Got scanner to reset file rather than closing and opening