Added: I/O and error handler