I figured out the answer to my question. Found a similar process in another area of the program that was causing the file to stay open.