added file check on database no point in creating it more than once