Revised the recvScrenshot function