Some work towards adding logging & response handling from mega.co.nz