Added free-space check