Fixed call to OS to be compatible with linux or windows