Add I/O functionality