Writing console to pid File.
Set permissions