Fix wrong error message if file not found