Attempt to make capfile work better