More robust for POSIX
Rewrite for function
Run clean script