Improve drive space check

Changed function for checking drive space