Client: correction; fixed permissions; better errors handling.