How to Prevent macbook from sleeping when the lid is closed?
Nope, closing the lid will automatically sleep your Mac. If you want your Mac's screen to be off but for it to continue downloading, download the Caffeine app from the Mac App Store and turn it on (Caffiene stops your Mac from sleeping temporarily) then dim your brightness all the way. The task will continue and the screen will stay off.