Added linux functions; passed content to the write func