Basic I/O functions implemented