mount code error handling