better file creation for db config