Adding hook to automatically update files