Added so that filepath runs on user connection. To ensure you get correct history