Make the filename hooks a bit more flexible. #16