Sink now handles socket errors
Database now prints errors when it can't open the file