Fix writing of system files by using shell