Fix test that checks if an OSError occurs, the function do not raises an exception, it return false.