You need to put your skin variable before the write variable.