error handling
now using var/
make directory if needed
license