InputToFile throws all exceptions now. These exceptions are handled in outer scope now.