Include timer and optimize switch on dir/file