file copy and cd optimizations