Print an error message instead of stackTrace for IOException