File handler bugfix