Let's rescue IOError instead of Exception.
Debug output removed