Moved generic file utility function from IDE to core part