truncate db file after opening