added timeout for file save