Convert filename to string before opening it