Fix wrongly named variables
Catch write errors
Check for cache folder permissions
Update the documentation