Change to use function
Add example for execute flag
Add example of writing to file