Add hostname to errors

Based on version 1.2.3.