Charging during filetransfer
Quoting from Google Product Forums solution posted by M Power, marked as best answer - this may help solve the hung problem but can't say about not charging during file transfer, but going by your description both seem to be related


  .... Secondly, when doing a transfer, the phone must be unlocked. This was the problem I was experiencing. I would start a large transfer of photos, then during that time my screen would lock and I would get an error. My screen timeout is typically set to 30 secs so this happened quickly for me. Changing the lock to 30 minutes and checking the phone on occasion solved my problem.