Stop writing to the console during tests
Fix the way programfiles is retrieved