Keeping wifi active during lock
I'm assuming when you say "Lock" you mean that the screensaver kicks in so that you are prompted for a password.

I use an app called Amphetamine (https://itunes.apple.com/us/app/amphetamine/id937984704?l=en&amp;mt=12). It will make sure your Mac stays awake, but still allow it to start the screensaver (ie locking it). This way, any network activity continues (downloads, streaming, etc.), but your Mac is password protected.