Updated the fox script and added a logger