added exists method to IO