Special with contetx for scratch directory for better handling and
modularization.