Bug fix. Builds the path of Y_file before checking its existence